package com.teaching.teachingsupport.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.teaching.teachingsupport.common.pojo.dataobject.CollegeInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CollegeInfoMapper extends BaseMapper<CollegeInfo> {
    
    /**
     * 根据学院名称获取学院ID
     *
     * @param name 学院名称
     * @return 学院ID，如果不存在返回null
     */
    @Select("SELECT college_id FROM college_info WHERE name = #{name}")
    Long getCollegeIdByName(String name);
} 